/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package telas;

import aplicacao.Aplicacao;
import aplicacao.AplicacaoDAO;
import aplicacao.AplicacaoModal;
import java.awt.Color;
import java.util.List;
import javax.swing.JOptionPane;
import javax.swing.JPanel;
import javax.swing.JTable;
import aplicacaoPlano.AplicacaoPlano;
import aplicacaoPlano.AplicacaoPlanoDAO;
import aplicacaoPlano.AplicacaoPlanoModal;
import vacina.Vacina;
import vacina.VacinaDAO;

/**
 *
 * @author Max Weber
 */
public class O14TelaAdicionarAplicacao extends javax.swing.JFrame {

    JTable tbPlanoDeVacinacao;

    /**
     * Creates new form O10TelaConsultarVacinas
     */
    public O14TelaAdicionarAplicacao() {
        initComponents();
        AplicacaoDAO dao = new AplicacaoDAO();
        AplicacaoModal aplicacoes = new AplicacaoModal(dao.listar());
        tbAdicionarAplicacao.setModel(aplicacoes);
    }

    O14TelaAdicionarAplicacao(JTable tbPlanoDeVacinacao) {
        //To change body of generated methods, choose Tools | Templates.
        initComponents();
        AplicacaoDAO dao = new AplicacaoDAO();
        AplicacaoModal aplicacoes = new AplicacaoModal(dao.listar());
        tbAdicionarAplicacao.setModel(aplicacoes);
        this.tbPlanoDeVacinacao = tbPlanoDeVacinacao;
    }

    /**
     * This method is called from within the constructor to initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is always
     * regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        bgEntrou = new javax.swing.JLabel();
        bgSaiu = new javax.swing.JLabel();
        jPanel1 = new javax.swing.JPanel();
        jLabel3 = new javax.swing.JLabel();
        painelFechar = new javax.swing.JPanel();
        btFechar = new javax.swing.JLabel();
        btMaxi = new javax.swing.JLabel();
        btMini = new javax.swing.JLabel();
        jPanel2 = new javax.swing.JPanel();
        btSelecionar = new javax.swing.JPanel();
        iconSelecionar = new javax.swing.JLabel();
        tfSelecionar = new javax.swing.JLabel();
        btExcluir = new javax.swing.JPanel();
        iconExcluir = new javax.swing.JLabel();
        tfExcluir = new javax.swing.JLabel();
        jScrollPane1 = new javax.swing.JScrollPane();
        tbAdicionarAplicacao = new javax.swing.JTable();
        btNovaAplicacao = new javax.swing.JPanel();
        iconNovaAplicacao = new javax.swing.JLabel();
        tfNovaAplicacao = new javax.swing.JLabel();
        jLabel2 = new javax.swing.JLabel();
        jLabel1 = new javax.swing.JLabel();

        bgEntrou.setBackground(new java.awt.Color(68, 165, 237));
        bgEntrou.setText("jLabel4");

        bgSaiu.setBackground(new java.awt.Color(10, 66, 108));
        bgSaiu.setText("jLabel4");

        setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
        setUndecorated(true);
        getContentPane().setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());

        jPanel1.setBackground(new java.awt.Color(0, 114, 180));
        jPanel1.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(204, 204, 204)));

        jLabel3.setIcon(new javax.swing.ImageIcon(getClass().getResource("/img/icone_barraDeTit.png"))); // NOI18N

        painelFechar.setBackground(new java.awt.Color(128, 128, 128));
        painelFechar.addMouseMotionListener(new java.awt.event.MouseMotionAdapter() {
            public void mouseMoved(java.awt.event.MouseEvent evt) {
                painelFecharMouseMoved(evt);
            }
        });
        painelFechar.addMouseWheelListener(new java.awt.event.MouseWheelListener() {
            public void mouseWheelMoved(java.awt.event.MouseWheelEvent evt) {
                painelFecharMouseWheelMoved(evt);
            }
        });
        painelFechar.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseEntered(java.awt.event.MouseEvent evt) {
                painelFecharMouseEntered(evt);
            }
            public void mouseExited(java.awt.event.MouseEvent evt) {
                painelFecharMouseExited(evt);
            }
            public void mousePressed(java.awt.event.MouseEvent evt) {
                painelFecharMousePressed(evt);
            }
            public void mouseReleased(java.awt.event.MouseEvent evt) {
                painelFecharMouseReleased(evt);
            }
        });

        btFechar.setIcon(new javax.swing.ImageIcon(getClass().getResource("/img/fechar.png"))); // NOI18N
        btFechar.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                btFecharMouseClicked(evt);
            }
            public void mouseEntered(java.awt.event.MouseEvent evt) {
                btFecharMouseEntered(evt);
            }
        });

        javax.swing.GroupLayout painelFecharLayout = new javax.swing.GroupLayout(painelFechar);
        painelFechar.setLayout(painelFecharLayout);
        painelFecharLayout.setHorizontalGroup(
            painelFecharLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(painelFecharLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(btFechar)
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
        painelFecharLayout.setVerticalGroup(
            painelFecharLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, painelFecharLayout.createSequentialGroup()
                .addGap(3, 3, 3)
                .addComponent(btFechar)
                .addGap(3, 3, 3))
        );

        btMaxi.setIcon(new javax.swing.ImageIcon(getClass().getResource("/img/maximizar.png"))); // NOI18N

        btMini.setIcon(new javax.swing.ImageIcon(getClass().getResource("/img/minimizar.png"))); // NOI18N

        jPanel2.setBackground(new java.awt.Color(255, 255, 255));
        jPanel2.setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());

        btSelecionar.setBackground(new java.awt.Color(10, 66, 108));
        btSelecionar.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                btSelecionarMouseClicked(evt);
            }
            public void mouseEntered(java.awt.event.MouseEvent evt) {
                btSelecionarMouseEntered(evt);
            }
            public void mouseExited(java.awt.event.MouseEvent evt) {
                btSelecionarMouseExited(evt);
            }
        });
        btSelecionar.setLayout(new java.awt.GridBagLayout());

        iconSelecionar.setIcon(new javax.swing.ImageIcon(getClass().getResource("/img/Check-32.png"))); // NOI18N
        iconSelecionar.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                iconSelecionarMouseClicked(evt);
            }
            public void mouseEntered(java.awt.event.MouseEvent evt) {
                iconSelecionarMouseEntered(evt);
            }
            public void mouseExited(java.awt.event.MouseEvent evt) {
                iconSelecionarMouseExited(evt);
            }
        });
        btSelecionar.add(iconSelecionar, new java.awt.GridBagConstraints());

        tfSelecionar.setFont(new java.awt.Font("Arial", 1, 16)); // NOI18N
        tfSelecionar.setForeground(new java.awt.Color(255, 255, 255));
        tfSelecionar.setText(" Selecionar");
        tfSelecionar.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                tfSelecionarMouseClicked(evt);
            }
            public void mouseEntered(java.awt.event.MouseEvent evt) {
                tfSelecionarMouseEntered(evt);
            }
            public void mouseExited(java.awt.event.MouseEvent evt) {
                tfSelecionarMouseExited(evt);
            }
        });
        btSelecionar.add(tfSelecionar, new java.awt.GridBagConstraints());

        jPanel2.add(btSelecionar, new org.netbeans.lib.awtextra.AbsoluteConstraints(20, 270, 125, 30));

        btExcluir.setBackground(new java.awt.Color(10, 66, 108));
        btExcluir.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                btExcluirMouseClicked(evt);
            }
            public void mouseEntered(java.awt.event.MouseEvent evt) {
                btExcluirMouseEntered(evt);
            }
            public void mouseExited(java.awt.event.MouseEvent evt) {
                btExcluirMouseExited(evt);
            }
        });
        btExcluir.setLayout(new java.awt.GridBagLayout());

        iconExcluir.setIcon(new javax.swing.ImageIcon(getClass().getResource("/img/excluir2.png"))); // NOI18N
        iconExcluir.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                iconExcluirMouseClicked(evt);
            }
            public void mouseEntered(java.awt.event.MouseEvent evt) {
                iconExcluirMouseEntered(evt);
            }
            public void mouseExited(java.awt.event.MouseEvent evt) {
                iconExcluirMouseExited(evt);
            }
        });
        btExcluir.add(iconExcluir, new java.awt.GridBagConstraints());

        tfExcluir.setFont(new java.awt.Font("Arial", 1, 16)); // NOI18N
        tfExcluir.setForeground(new java.awt.Color(255, 255, 255));
        tfExcluir.setText("Excluir");
        tfExcluir.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                tfExcluirMouseClicked(evt);
            }
            public void mouseEntered(java.awt.event.MouseEvent evt) {
                tfExcluirMouseEntered(evt);
            }
            public void mouseExited(java.awt.event.MouseEvent evt) {
                tfExcluirMouseExited(evt);
            }
        });
        btExcluir.add(tfExcluir, new java.awt.GridBagConstraints());

        jPanel2.add(btExcluir, new org.netbeans.lib.awtextra.AbsoluteConstraints(360, 270, 110, 30));

        tbAdicionarAplicacao.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null}
            },
            new String [] {
                "Title 1", "Title 2", "Title 3", "Title 4"
            }
        ));
        jScrollPane1.setViewportView(tbAdicionarAplicacao);

        jPanel2.add(jScrollPane1, new org.netbeans.lib.awtextra.AbsoluteConstraints(20, 20, -1, 210));

        btNovaAplicacao.setBackground(new java.awt.Color(10, 66, 108));
        btNovaAplicacao.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                btNovaAplicacaoMouseClicked(evt);
            }
            public void mouseEntered(java.awt.event.MouseEvent evt) {
                btNovaAplicacaoMouseEntered(evt);
            }
            public void mouseExited(java.awt.event.MouseEvent evt) {
                btNovaAplicacaoMouseExited(evt);
            }
        });
        btNovaAplicacao.setLayout(new java.awt.GridBagLayout());

        iconNovaAplicacao.setIcon(new javax.swing.ImageIcon(getClass().getResource("/img/nova vacina.png"))); // NOI18N
        iconNovaAplicacao.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                iconNovaAplicacaoMouseClicked(evt);
            }
            public void mouseEntered(java.awt.event.MouseEvent evt) {
                iconNovaAplicacaoMouseEntered(evt);
            }
            public void mouseExited(java.awt.event.MouseEvent evt) {
                iconNovaAplicacaoMouseExited(evt);
            }
        });
        btNovaAplicacao.add(iconNovaAplicacao, new java.awt.GridBagConstraints());

        tfNovaAplicacao.setFont(new java.awt.Font("Arial", 1, 16)); // NOI18N
        tfNovaAplicacao.setForeground(new java.awt.Color(255, 255, 255));
        tfNovaAplicacao.setText(" Nova aplicação");
        tfNovaAplicacao.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                tfNovaAplicacaoMouseClicked(evt);
            }
            public void mouseEntered(java.awt.event.MouseEvent evt) {
                tfNovaAplicacaoMouseEntered(evt);
            }
            public void mouseExited(java.awt.event.MouseEvent evt) {
                tfNovaAplicacaoMouseExited(evt);
            }
        });
        btNovaAplicacao.add(tfNovaAplicacao, new java.awt.GridBagConstraints());

        jPanel2.add(btNovaAplicacao, new org.netbeans.lib.awtextra.AbsoluteConstraints(170, 270, 170, 30));

        jLabel2.setFont(new java.awt.Font("Arial Rounded MT Bold", 0, 18)); // NOI18N
        jLabel2.setForeground(new java.awt.Color(255, 255, 255));
        jLabel2.setText("Adicionar aplicação");

        jLabel1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/img/vacinapeq.png"))); // NOI18N

        javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
        jPanel1.setLayout(jPanel1Layout);
        jPanel1Layout.setHorizontalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addGap(3, 3, 3)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jPanel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addGroup(jPanel1Layout.createSequentialGroup()
                        .addComponent(jLabel3)
                        .addGap(51, 51, 51)
                        .addComponent(jLabel1)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jLabel2)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addComponent(btMini)
                        .addGap(5, 5, 5)
                        .addComponent(btMaxi)
                        .addGap(5, 5, 5)
                        .addComponent(painelFechar, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addGap(3, 3, 3))
        );
        jPanel1Layout.setVerticalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addGap(3, 3, 3)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                        .addComponent(painelFechar, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addComponent(jLabel2)
                        .addComponent(jLabel1)
                        .addComponent(jLabel3))
                    .addGroup(jPanel1Layout.createSequentialGroup()
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                            .addComponent(btMaxi)
                            .addComponent(btMini))
                        .addGap(5, 5, 5)))
                .addGap(3, 3, 3)
                .addComponent(jPanel2, javax.swing.GroupLayout.DEFAULT_SIZE, 317, Short.MAX_VALUE)
                .addGap(3, 3, 3))
        );

        getContentPane().add(jPanel1, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 0, 500, 350));

        pack();
        setLocationRelativeTo(null);
    }// </editor-fold>//GEN-END:initComponents

    private void painelFecharMouseReleased(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_painelFecharMouseReleased

    }//GEN-LAST:event_painelFecharMouseReleased

    private void painelFecharMousePressed(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_painelFecharMousePressed
        //painelFechar.setBackground(Color.red);
    }//GEN-LAST:event_painelFecharMousePressed

    private void painelFecharMouseExited(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_painelFecharMouseExited
        // TODO add your handling code here:
        painelFechar.setBackground(Color.gray);

    }//GEN-LAST:event_painelFecharMouseExited

    private void painelFecharMouseEntered(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_painelFecharMouseEntered
        // TODO add your handling code here:
        painelFechar.setBackground(Color.red);
    }//GEN-LAST:event_painelFecharMouseEntered

    private void bgEntra(JPanel painel) {
        painel.setBackground(bgEntrou.getBackground());
    }

    private void bgSai(JPanel painel) {
        painel.setBackground(bgSaiu.getBackground());
    }

    private void painelFecharMouseWheelMoved(java.awt.event.MouseWheelEvent evt) {//GEN-FIRST:event_painelFecharMouseWheelMoved

    }//GEN-LAST:event_painelFecharMouseWheelMoved

    private void painelFecharMouseMoved(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_painelFecharMouseMoved

    }//GEN-LAST:event_painelFecharMouseMoved

    private void btFecharMouseEntered(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_btFecharMouseEntered
        painelFechar.setBackground(Color.red);
    }//GEN-LAST:event_btFecharMouseEntered

    private void btFecharMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_btFecharMouseClicked
        // TODO add your handling code here:
        dispose();
    }//GEN-LAST:event_btFecharMouseClicked

    private void iconSelecionarMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_iconSelecionarMouseClicked
        // TODO add your handling code here:

    }//GEN-LAST:event_iconSelecionarMouseClicked

    private void iconSelecionarMouseEntered(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_iconSelecionarMouseEntered
        bgEntra(btSelecionar);
    }//GEN-LAST:event_iconSelecionarMouseEntered

    private void iconSelecionarMouseExited(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_iconSelecionarMouseExited
        bgSai(btSelecionar);
    }//GEN-LAST:event_iconSelecionarMouseExited

    private void tfSelecionarMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_tfSelecionarMouseClicked
        int linha = tbAdicionarAplicacao.getSelectedRow();
        if (linha == -1) {
            JOptionPane.showMessageDialog(rootPane, "Por favor, selecione uma aplicação");
        } else {
            //resgata objeto aplicação
            Aplicacao aplicacao = new Aplicacao();
            int codigo = (int) tbAdicionarAplicacao.getValueAt(linha, 0);
            AplicacaoDAO dao = new AplicacaoDAO();
            aplicacao = dao.pesquisarCodigo(codigo);

            //adiciona ao plano
            AplicacaoPlano planoAplicacao = new AplicacaoPlano();
            planoAplicacao.setAplicacao(aplicacao);
            AplicacaoPlanoDAO dao2 = new AplicacaoPlanoDAO();
            dao2.adicionar(planoAplicacao);

            //recarrega a tabela
            AplicacaoPlanoModal ltm = new AplicacaoPlanoModal(dao2.listar());
            tbPlanoDeVacinacao.setModel(ltm);
            dispose();

        }
    }//GEN-LAST:event_tfSelecionarMouseClicked

    private void tfSelecionarMouseEntered(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_tfSelecionarMouseEntered
        bgEntra(btSelecionar);
    }//GEN-LAST:event_tfSelecionarMouseEntered

    private void tfSelecionarMouseExited(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_tfSelecionarMouseExited
        bgSai(btSelecionar);
    }//GEN-LAST:event_tfSelecionarMouseExited

    private void btSelecionarMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_btSelecionarMouseClicked
        // TODO add your handling code here:

    }//GEN-LAST:event_btSelecionarMouseClicked

    private void btSelecionarMouseEntered(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_btSelecionarMouseEntered
        // TODO add your handling code here:
        bgEntra(btSelecionar);
    }//GEN-LAST:event_btSelecionarMouseEntered

    private void btSelecionarMouseExited(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_btSelecionarMouseExited
        bgSai(btSelecionar);
    }//GEN-LAST:event_btSelecionarMouseExited

    private void iconExcluirMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_iconExcluirMouseClicked
        // TODO add your handling code here:
    }//GEN-LAST:event_iconExcluirMouseClicked

    private void iconExcluirMouseEntered(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_iconExcluirMouseEntered
        // TODO add your handling code here:
        bgEntra(btExcluir);
    }//GEN-LAST:event_iconExcluirMouseEntered

    private void iconExcluirMouseExited(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_iconExcluirMouseExited
        // TODO add your handling code here:
        bgSai(btExcluir);
    }//GEN-LAST:event_iconExcluirMouseExited

    private void tfExcluirMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_tfExcluirMouseClicked
        // TODO add your handling code here:
        int linha = tbAdicionarAplicacao.getSelectedRow();
        if (linha == -1) {
            JOptionPane.showMessageDialog(rootPane, "Por favor, selecione uma aplicação");
        } else {

            Aplicacao aplicacao = new Aplicacao();
            int codigo = (int) tbAdicionarAplicacao.getValueAt(linha, 0);

            AplicacaoDAO dao = new AplicacaoDAO();
            aplicacao = dao.pesquisarCodigo(codigo);

            O16AvisoExcluirAplicacao tela = new O16AvisoExcluirAplicacao(aplicacao, tbAdicionarAplicacao);
            tela.setVisible(true);
        }

    }//GEN-LAST:event_tfExcluirMouseClicked

    private void tfExcluirMouseEntered(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_tfExcluirMouseEntered
        // TODO add your handling code here:
        bgEntra(btExcluir);
    }//GEN-LAST:event_tfExcluirMouseEntered

    private void tfExcluirMouseExited(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_tfExcluirMouseExited
        // TODO add your handling code here:
        bgSai(btExcluir);
    }//GEN-LAST:event_tfExcluirMouseExited

    private void btExcluirMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_btExcluirMouseClicked
        // TODO add your handling code here:
    }//GEN-LAST:event_btExcluirMouseClicked

    private void btExcluirMouseEntered(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_btExcluirMouseEntered
        // TODO add your handling code here:
        bgEntra(btExcluir);
    }//GEN-LAST:event_btExcluirMouseEntered

    private void btExcluirMouseExited(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_btExcluirMouseExited
        // TODO add your handling code here:
        bgSai(btExcluir);
    }//GEN-LAST:event_btExcluirMouseExited

    private void iconNovaAplicacaoMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_iconNovaAplicacaoMouseClicked
        // TODO add your handling code here:
    }//GEN-LAST:event_iconNovaAplicacaoMouseClicked

    private void iconNovaAplicacaoMouseEntered(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_iconNovaAplicacaoMouseEntered
        // TODO add your handling code here:
        bgEntra(btNovaAplicacao);
    }//GEN-LAST:event_iconNovaAplicacaoMouseEntered

    private void iconNovaAplicacaoMouseExited(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_iconNovaAplicacaoMouseExited
        // TODO add your handling code here:
        bgSai(btNovaAplicacao);
    }//GEN-LAST:event_iconNovaAplicacaoMouseExited

    private void tfNovaAplicacaoMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_tfNovaAplicacaoMouseClicked
        // TODO add your handling code here:
        O15TelaCadastrarAplicacao tela = new O15TelaCadastrarAplicacao(tbAdicionarAplicacao);
        tela.setVisible(true);
    }//GEN-LAST:event_tfNovaAplicacaoMouseClicked

    private void tfNovaAplicacaoMouseEntered(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_tfNovaAplicacaoMouseEntered
        // TODO add your handling code here:
        bgEntra(btNovaAplicacao);
    }//GEN-LAST:event_tfNovaAplicacaoMouseEntered

    private void tfNovaAplicacaoMouseExited(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_tfNovaAplicacaoMouseExited
        // TODO add your handling code here:
        bgSai(btNovaAplicacao);
    }//GEN-LAST:event_tfNovaAplicacaoMouseExited

    private void btNovaAplicacaoMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_btNovaAplicacaoMouseClicked
        // TODO add your handling code here:
    }//GEN-LAST:event_btNovaAplicacaoMouseClicked

    private void btNovaAplicacaoMouseEntered(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_btNovaAplicacaoMouseEntered
        // TODO add your handling code here:
        bgEntra(btNovaAplicacao);
    }//GEN-LAST:event_btNovaAplicacaoMouseEntered

    private void btNovaAplicacaoMouseExited(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_btNovaAplicacaoMouseExited
        // TODO add your handling code here:
        bgSai(btNovaAplicacao);
    }//GEN-LAST:event_btNovaAplicacaoMouseExited

    /**
     * @param args the command line arguments
     */
    public static void main(String args[]) {
        /* Set the Nimbus look and feel */
        //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
        /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
         * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html 
         */
        try {
            for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
                if ("Nimbus".equals(info.getName())) {
                    javax.swing.UIManager.setLookAndFeel(info.getClassName());
                    break;
                }
            }
        } catch (ClassNotFoundException ex) {
            java.util.logging.Logger.getLogger(O14TelaAdicionarAplicacao.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (InstantiationException ex) {
            java.util.logging.Logger.getLogger(O14TelaAdicionarAplicacao.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (IllegalAccessException ex) {
            java.util.logging.Logger.getLogger(O14TelaAdicionarAplicacao.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (javax.swing.UnsupportedLookAndFeelException ex) {
            java.util.logging.Logger.getLogger(O14TelaAdicionarAplicacao.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        }
        //</editor-fold>
        //</editor-fold>
        //</editor-fold>
        //</editor-fold>

        /* Create and display the form */
        java.awt.EventQueue.invokeLater(new Runnable() {
            public void run() {
                new O14TelaAdicionarAplicacao().setVisible(true);
            }
        });
    }

    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JLabel bgEntrou;
    private javax.swing.JLabel bgSaiu;
    private javax.swing.JPanel btExcluir;
    private javax.swing.JLabel btFechar;
    private javax.swing.JLabel btMaxi;
    private javax.swing.JLabel btMini;
    private javax.swing.JPanel btNovaAplicacao;
    private javax.swing.JPanel btSelecionar;
    private javax.swing.JLabel iconExcluir;
    private javax.swing.JLabel iconNovaAplicacao;
    private javax.swing.JLabel iconSelecionar;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JLabel jLabel3;
    private javax.swing.JPanel jPanel1;
    private javax.swing.JPanel jPanel2;
    private javax.swing.JScrollPane jScrollPane1;
    private javax.swing.JPanel painelFechar;
    private javax.swing.JTable tbAdicionarAplicacao;
    private javax.swing.JLabel tfExcluir;
    private javax.swing.JLabel tfNovaAplicacao;
    private javax.swing.JLabel tfSelecionar;
    // End of variables declaration//GEN-END:variables
}
